class OrderListEntity {
  OrderListData data;
  int code;
  String msg;

  OrderListEntity({this.data, this.code, this.msg});

  OrderListEntity.fromJson(Map<String, dynamic> json) {
    data = json['data']['list'] != null
        ? new OrderListData.fromJson(json['data']['list'])
        : null;
    code = json['code'];
    msg = json['msg'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.data != null) {
      data['data']['list']['data'] = this.data.toJson();
    }
    data['code'] = this.code;
    data['msg'] = this.msg;
    return data;
  }
}

class OrderListData {
  List<OrderListDataData> datas;

  OrderListData();

  OrderListData.fromJson(Map<String, dynamic> json) {
    if (json['data'] != null) {
      datas = new List<OrderListDataData>();
      (json['data'] as List).forEach((v) {
        datas.add(new OrderListDataData.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.datas != null) {
      data['data'] = this.datas.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class OrderListDataData {
  String contact_number;
  String status;
  String is_refund = "Y";
  String id;
  String address;
  String start_time;
  String consignee;
  String img;
  String title;
  String logistics;
  String express_number;
  String is_stock_up;
  String create_time;
  String allprice;
  String order_num;
  String deliver_time;
  String finish_time;
  String postage;
  String pay_time;
  String coupons;
  String status_zh;
  String is_delay_goods;
  String refund_address;
  String drawback_refuse_reason;
  String refund_express_number;
  String is_platform_payment;
  String logistics_exchange_goods;
  String exchange_goods_express_number;
  bool isSelect = false;
  List<OrderListDetailData> datas;

  OrderListDataData(
      {this.contact_number,
      this.allprice,
      this.order_num,
      this.status,
      this.express_number,
      this.logistics,
      this.id,
      this.refund_address,
      this.drawback_refuse_reason,
      this.refund_express_number,
      this.is_platform_payment,
      this.start_time,
      this.create_time,
      this.consignee,
      this.address});

  OrderListDataData.fromJson(Map<String, dynamic> json) {
    print(json);
    is_stock_up = json['is_stock_up'].toString();
    address = json['address'];
    create_time = json['create_time'];
    order_num = json['order_num'];
    coupons=json['coupons'].toString();
    postage = json['postage'].toString();
    is_refund = json['is_refund'];
    title = json['title'].toString();
    img = json['img'].toString().replaceAll("\\", "/");

    consignee = json['consignee'];
    id = json['id'].toString();
    deliver_time = json['deliver_time'];
    is_delay_goods = json['is_delay_goods'];
    pay_time = json['pay_time'];
    status_zh = json['status_zh'].toString();
    exchange_goods_express_number =
        json['exchange_goods_express_number'].toString();
    logistics_exchange_goods = json['logistics_exchange_goods'].toString();
    express_number = json['express_number'];
    logistics = json['LogName'];
    if (logistics == null) {
      logistics = json['logistics'].toString();
    }
    refund_address = json['refund_address'];
    is_platform_payment = json['is_platform_payment'].toString();
    allprice = json['allprice'].toString();
    status = json['status'].toString();
    drawback_refuse_reason = json['drawback_refuse_reason'];
    refund_express_number = json['refund_express_number'];
    contact_number = json['contact_number'];
    start_time = json['start_time'];
    if (json['detail'] != null) {
      datas = new List<OrderListDetailData>();
      (json['detail'] as List).forEach((v) {
        datas.add(new OrderListDetailData.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['contact_number'] = this.contact_number;
    data['start_time'] = this.start_time;
    data['consignee'] = this.consignee;
    data['id'] = this.id;
    data['allprice'] = this.allprice;
    data['create_time'] = this.create_time;
    data['address'] = this.address;
    data['status'] = this.status;
    return data;
  }
}

class OrderListDetailData {
  String order_detail_id;
  String goods_id;
  String img;
  String goods_name;
  String start_time;
  String num;
  String sku_str;
  String price;
  String order_num;
  String allprice;
  OrderListDetailData(
      {this.order_detail_id,
      this.price,
      this.order_num,
      this.goods_id,
      this.img,
      this.start_time,
      this.sku_str,
      this.num,
      this.goods_name});

  OrderListDetailData.fromJson(Map<String, dynamic> json) {
    goods_name = json['goods_name'];
    sku_str = json['sku_str'];
    order_num = json['order_num'];
    num = json['num'].toString();
    allprice = json['allprice'].toString();
    img = json['img'].toString().replaceAll("\\", "/");
    price = json['price'].toString();
    goods_id = json['goods_id'].toString();
    order_detail_id = json['order_detail_id'].toString();
    order_num = json['order_num'].toString();
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['order_detail_id'] = this.order_detail_id;
    data['order_num'] = this.order_num;
    data['num'] = this.num;
    data['img'] = this.img;
    data['price'] = this.price;
    data['sku_str'] = this.sku_str;
    data['goods_name'] = this.goods_name;
    data['goods_id'] = this.goods_id;
    return data;
  }
}

class OrderListDataDatasTag {
  String name;
  String url;

  OrderListDataDatasTag({this.name, this.url});

  OrderListDataDatasTag.fromJson(Map<String, dynamic> json) {
    name = json['name'];
    url = json['url'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['name'] = this.name;
    data['url'] = this.url;
    return data;
  }
}
